<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>文本域</title>
		<!--框架必需start-->
		<script type="text/javascript" src="../../libs/js/jquery.js"></script>
		<script type="text/javascript" src="../../libs/js/language/cn.js"></script>
		<script type="text/javascript" src="../../libs/js/framework.js"></script>
		<link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" id="skin" prePath="../../" />
		<link rel="stylesheet" type="text/css" id="customSkin" />
		<!--框架必需end-->
	</head>

	<body>
		<div class="page_content">

			<div class="groupTitle"><span>1、基本文本域</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea></textarea></td>
				</tr>
			</table>

			<div class="height_15"></div>

			<div class="groupTitle"><span>2、设置初始值</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea>这是初始值</textarea></td>
				</tr>
			</table>

			<div class="height_15"></div>

			<div class="groupTitle"><span>3、自定义尺寸</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea style="width:350px;height:150px;"></textarea></td>
				</tr>
			</table>

			<div class="height_15"></div>

			<div class="groupTitle"><span>4、显示水印</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea watermark="请填写备注信息"></textarea></td>
				</tr>
			</table>

			<div class="height_15"></div>

			<div class="groupTitle"><span>5、限制输入字数</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea maxNum="150"></textarea></td>
				</tr>
			</table>

			<div class="height_15"></div>

			

			<div class="groupTitle"><span>6、高度自适应</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea autoHeight="true"></textarea></td>
				</tr>
			</table>

			<div class="height_15"></div>

			<div class="groupTitle"><span>7、动态生成文本域</span></div>

			<input type="button" value="点击生成文本域" id="testBtn" />
			<div class="height_10"></div>

			<div class="height_15"></div>

			<div class="groupTitle"><span>8、禁用/启用</span></div>

			<table>
				<tr>
					<td width="10%">备注：</td>
					<td width="90%"><textarea id="textarea-9" disabled="true"></textarea></td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="button" value="启用" onclick="enableSelect()" />
						<input type="button" value="禁用" onclick="disableSelect()" />
					</td>
				</tr>
			</table>

			
		</div>

		<script type="text/javascript">
			//动态生成文本域
			$(function() {
				$("#testBtn").click(function() {
					var $ta = $('<textarea class="textarea" watermark="请填写备注信息"></textarea>');
					$(this).after($ta);
					$ta.render();
				})
			})

			//设为不可用
			function disableSelect() {
				$("#textarea-9").attr("disabled", true);
			}
			//设为可用
			function enableSelect() {
				$("#textarea-9").attr("disabled", false);
			}
		</script>

	</body>

</html>